package com.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;

/**
 * <p>
 * 历史日K数据
 * </p>
 *
 * @author chl
 * @since 2025-05-23
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="DStockTradeDaily2025对象", description="历史日K数据")
@TableName(value = "d_stock_trade_daily_2025")
public class DStockTradeDaily2025 extends Model<DStockTradeDaily2025> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "TS股票代码")
    private String tsCode;

    @ApiModelProperty(value = "交易日期")
    private String tradeDate;

    @ApiModelProperty(value = "日开盘价")
    private Float open;

    @ApiModelProperty(value = "日最高价")
    private Float high;

    @ApiModelProperty(value = "日最低价")
    private Float low;

    @ApiModelProperty(value = "当日收盘价")
    private Float close;

    @ApiModelProperty(value = "昨日收盘价")
    private Float preClose;

    @ApiModelProperty(value = "成交量 单位手")
    private Double vol;

    @ApiModelProperty(value = "成交金额 单位 千")
    private Double amount;

    @ApiModelProperty(value = "涨跌额")
    @TableField(value = "changee")
    private Float change;

    @ApiModelProperty(value = "涨跌幅")
    private Float pctChg;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
